
package interface_grafica;

import javax.swing.*;

import listeners.ListenersTelaCadastroSocio;
import listeners.ListenersTelaCarteiraSocios;
import listeners.ListenersTelaConsultaSocio;

public class TelaCarteiraSocios extends javax.swing.JPanel {

    private static TelaCadastroSocio instance;

    public static TelaCadastroSocio getInstance() {
        if (instance == null) {
            instance = new TelaCadastroSocio();
        }
        return instance;
    }     
    
    public TelaCarteiraSocios() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        opcaoSexo = new javax.swing.ButtonGroup();
        nomeSocio = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        cpfSocio = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        idSocio = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        painelCarteira = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        nomeSocioCarteira = new javax.swing.JTextField();
        fotoCarteira = new javax.swing.JLabel();
        idSocioCarteira = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        enderecoCarteira = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        nomeMaeCarteira = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        nomePaiCarteira = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        quantMoradoresCarteira = new javax.swing.JTextField();
        foto = new javax.swing.JLabel();
        btGerarCarteira = new javax.swing.JButton();
        btCancelar = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();

        setPreferredSize(new java.awt.Dimension(1063, 557));

        nomeSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel18.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel18.setText("CPF:");

        cpfSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel26.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel26.setText("ID:");

        idSocio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel1.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel1.setText("Nome completo:");

        painelCarteira.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Carteira Gerada", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 14), new java.awt.Color(0, 0, 0))); // NOI18N

        jLabel2.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel2.setText("Nome completo");

        nomeSocioCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        fotoCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        fotoCarteira.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        fotoCarteira.setText("Foto");
        fotoCarteira.setAlignmentX(5.0F);
        fotoCarteira.setAlignmentY(5.0F);
        fotoCarteira.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        idSocioCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel27.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel27.setText("ID");

        enderecoCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel3.setText("Endereco");

        jLabel4.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel4.setText("Nome da mae");

        nomeMaeCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel5.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel5.setText("Nome dos pais");

        nomePaiCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        jLabel6.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel6.setText("Quantidad de moradores");

        jLabel7.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        jLabel7.setText("na residencia");

        quantMoradoresCarteira.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N

        javax.swing.GroupLayout painelCarteiraLayout = new javax.swing.GroupLayout(painelCarteira);
        painelCarteira.setLayout(painelCarteiraLayout);
        painelCarteiraLayout.setHorizontalGroup(
            painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelCarteiraLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(fotoCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(painelCarteiraLayout.createSequentialGroup()
                        .addGap(2, 2, 2)
                        .addComponent(jLabel27)
                        .addGap(18, 18, 18)
                        .addComponent(idSocioCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel6)
                    .addGroup(painelCarteiraLayout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(quantMoradoresCarteira)))
                .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelCarteiraLayout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(nomePaiCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2)
                            .addComponent(nomeSocioCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(enderecoCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, painelCarteiraLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(nomeMaeCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        painelCarteiraLayout.setVerticalGroup(
            painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(painelCarteiraLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(painelCarteiraLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nomeSocioCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(enderecoCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(nomeMaeCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nomePaiCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(painelCarteiraLayout.createSequentialGroup()
                        .addComponent(fotoCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel27)
                            .addComponent(idSocioCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(painelCarteiraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(quantMoradoresCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        foto.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        foto.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        foto.setText("Foto");
        foto.setAlignmentX(5.0F);
        foto.setAlignmentY(5.0F);
        foto.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btGerarCarteira.setText("Gerar Carteira");
        btGerarCarteira.addActionListener(new ListenersTelaCarteiraSocios());

        btCancelar.setText("Cancelar");
        btCancelar.addActionListener(new ListenersTelaCarteiraSocios());

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel8.setText("Gerador de Carteira");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(152, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cpfSocio, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(painelCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18)
                            .addComponent(jLabel26)
                            .addComponent(jLabel1)
                            .addComponent(nomeSocio, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(idSocio, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(190, 190, 190)))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(92, 92, 92)
                        .addComponent(foto, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(71, 71, 71)
                        .addComponent(btGerarCarteira)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btCancelar)))
                .addGap(110, 110, 110))
            .addGroup(layout.createSequentialGroup()
                .addGap(395, 395, 395)
                .addComponent(jLabel8)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(33, 33, 33)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(foto, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(288, 288, 288)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btGerarCarteira)
                            .addComponent(btCancelar)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel26)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(idSocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nomeSocio, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cpfSocio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(painelCarteira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(63, 63, 63))
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCancelar;
    private javax.swing.JButton btGerarCarteira;
    private javax.swing.JTextField cpfSocio;
    private javax.swing.JTextField enderecoCarteira;
    private javax.swing.JLabel foto;
    private javax.swing.JLabel fotoCarteira;
    private javax.swing.JTextField idSocio;
    private javax.swing.JTextField idSocioCarteira;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JTextField nomeMaeCarteira;
    private javax.swing.JTextField nomePaiCarteira;
    private javax.swing.JTextField nomeSocio;
    private javax.swing.JTextField nomeSocioCarteira;
    private javax.swing.ButtonGroup opcaoSexo;
    private javax.swing.JPanel painelCarteira;
    private javax.swing.JTextField quantMoradoresCarteira;
    // End of variables declaration//GEN-END:variables

    public JButton getBtCancelar() {
        return btCancelar;
    }

    public JButton getBtGerarCarteira() {
        return btGerarCarteira;
    }

    public String getCpfSocio() {
        return cpfSocio.getText();
    }

    public String getEnderecoCarteira() {
        return enderecoCarteira.getText();
    }

    public JLabel getFoto() {
        return foto;
    }

    public JLabel getFotoCarteira() {
        return fotoCarteira;
    }

    public String getIdSocio() {
        return idSocio.getText();
    }

    public String getIdSocioCarteira() {
        return idSocioCarteira.getText();
    }

    public String getNomeMaeCarteira() {
        return nomeMaeCarteira.getText();
    }

    public String getNomePaiCarteira() {
        return nomePaiCarteira.getText();
    }

    public String getNomeSocio() {
        return nomeSocio.getText();
    }

    public String getNomeSocioCarteira() {
        return nomeSocioCarteira.getText();
    }

    public ButtonGroup getOpcaoSexo() {
        return opcaoSexo;
    }

    public JPanel getPainelCarteira() {
        return painelCarteira;
    }

    public String getQuantMoradoresCarteira() {
        return quantMoradoresCarteira.getText();
    }

    

}
